package net.openadventure.location;

/**
 * An Entrance represents an entrance location for a Location. It has start
 * coordinates and end coordinates. Generally, the start coordinates will be
 * off-screen and the end coordinates will be on-screen. An Entrance is
 * immutable. Once made, it can not be changed.
 * 
 * @author phimes
 * 
 */
public final class Entrance {

	private final int startX;

	private final int startY;

	private final int endX;

	private final int endY;

	/**
	 * Creates a new Entrance with the given start and end coordinates
	 * 
	 * @param startX
	 *            the x-coordinate of the start point
	 * @param startY
	 *            the y-coordinate of the start point
	 * @param endX
	 *            the x-coordinate of the end point
	 * @param endY
	 *            the y-coordinate of the end point
	 */
	public Entrance(int startX, int startY, int endX, int endY) {

		this.startX = startX;
		this.startY = startY;
		this.endX = endX;
		this.endY = endY;
	}

	/**
	 * Gets the x-coordinate of the start point
	 * 
	 * @return the x-coordinate of the start point
	 */
	public int getStartX() {
		return startX;
	}

	/**
	 * Gets the y-coordinate of the start point
	 * 
	 * @return the y-coordinate of the start point
	 */
	public int getStartY() {
		return startY;
	}

	/**
	 * Gets the x-coordinate of the end point
	 * 
	 * @return the x-coordinate of the end point
	 */
	public int getEndX() {
		return endX;
	}

	/**
	 * Gets the y-coordinate of the end point
	 * 
	 * @return the y-coordinate of the end point
	 */
	public int getEndY() {
		return endY;
	}
}
